<!DOCTYPE html>
<html lang="en">
<head>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <meta charset="UTF-8">
    <title>v-show</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<!--    <input type="button" value="切换显示状态" @click="first1"></input>-->
<!--    <img v-show="" src="./src/img/15.jpg"  alt="">-->
    <input type="button" @click="changeisshow" value="切换显示状态"></input>
    <input type="button" @click="Addage" value="累加年龄"></input>
    <img src="../img/wl-op-1s.jpg  " width=200px  v-show="isShow">
    <img src="../img/wl-op-1s.jpg  " width=200px  v-show="age>=18">
<!--    <img src="../img/wl-op-1s.jpg">-->
</div>

<script>
    var app = new Vue({
        el:"#app",
        data:{
           isShow:false,
            age:17
        },
        methods:{
           changeisshow:function () {
                this.isShow = !this.isShow;
           },
           Addage:function () {
               this.age++;
           }
        },
    })
</script>
</body>
</html>
